﻿<Window x:Class="Sinacor.Infra.Tools.SchemaExtractor.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:PSE.Tools.SchemaComparer.Controls;assembly=PSE.Tools.SchemaComparer.Controls"
    Title="Sinacor Schema Extractor" Height="400" Width="700" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" ResizeMode="NoResize">
    <Grid x:Name="gridMain">
        <controls:LoadingAnimation x:Name="ucLoading"  Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center" Panel.ZIndex="9999" ></controls:LoadingAnimation>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="35*"></RowDefinition>
                <RowDefinition Height="65*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="24"></RowDefinition>
                    <RowDefinition Height="24"></RowDefinition>
                    <RowDefinition Height="24"></RowDefinition>
                    <RowDefinition Height="24"></RowDefinition>
                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Border Grid.Row="0" Grid.ColumnSpan="2" Background="LightGray" Panel.ZIndex="-1"></Border>
                <!--ROW 0-->
                <Label Grid.Row="0" Grid.ColumnSpan="2">Infome abaixo os dados de conexão com a base de Sistema do Sinacor.</Label>
                <!--ROW 1-->
                <Label Grid.Row="1">Data Source</Label>
                <TextBox Grid.Row="1" Grid.Column="1" x:Name="txtDataSource" Height="24" >
                </TextBox>
                <!--ROW 2-->
                <Label Grid.Row="2">User Name</Label>
                <TextBox Grid.Row="2" Grid.Column="1" x:Name="txtUserName" Height="24" ></TextBox>
                <!--ROW 3-->
                <Label Grid.Row="3">Password</Label>
                <PasswordBox Grid.Row="3" Grid.Column="1" x:Name="txtPassword" Height="24" ></PasswordBox>
                <!--ROW 4-->
                <Button Margin="4,4,0,0" VerticalAlignment="Top" HorizontalAlignment="Right" Grid.Row="4" Grid.ColumnSpan="2" Width="180" Height="24" x:Name="btnGetCompanies" Click="btnGetCompanies_Click">Recuperar Empresas Cadastradas</Button>
            </Grid>
            <Grid Grid.Row="1" Visibility="Collapsed" x:Name="gridExport">
                <Grid.RowDefinitions>
                    <RowDefinition Height="24"></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="40*"></ColumnDefinition>
                    <ColumnDefinition Width="60*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0" Grid.Column="0">Empresas cadastradas</Label>

                <ListBox DisplayMemberPath="Name" Grid.Row="1" Grid.Column="0" x:Name="lstCompanies" ItemsSource="{Binding Companies}" SelectionMode="Single"></ListBox>
                <Border Grid.Row="0" Grid.ColumnSpan="2" Background="LightGray" Panel.ZIndex="-1"></Border>
                <Grid Grid.Row="1" Grid.Column="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="24"></RowDefinition>
                        <RowDefinition Height="24"></RowDefinition>
                        <RowDefinition Height="24"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                        <ColumnDefinition Width="*" ></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Label Grid.Row="0" Grid.Column="0">Diretório de Saída</Label>
                    <TextBox Grid.Row="0" Grid.Column="1" Height="24" Margin="0,0,24,0" x:Name="txtDirectory"></TextBox>
                    <Button Grid.Row="0" Grid.Column="1" Height="24" Width="24" HorizontalAlignment="Right" x:Name="btnSelectDirectory" Click="btnSelectDirectory_Click">...</Button>
                    <CheckBox Grid.Row="1" Grid.ColumnSpan="2" VerticalAlignment="Center" x:Name="chkPasswordCifrado" ToolTip="Marque essa opção caso o password de acesso às bases de sistema sejam armazenados criptografados na base de dados">Marque essa opção caso o password seja armazenado criptografado na base</CheckBox>
                    <Button Grid.Row="3" Grid.ColumnSpan="2" Width="180" Height="24" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,0,0"  x:Name="btnExtrairSchemas" Click="btnExtrairSchemas_Click">Extrair DataBase Schemas</Button>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</Window>
